package cn.lanqiao.dao;

import cn.lanqiao.entity.User;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface UserDao {

    void insert(User user);

    List<User> query(@Param("start") int start, @Param("limit") int limit );

    @MapKey("user_id")
    @Select("select user_id, user_name, user_pass from t_user limit #{start}, #{limit} ")
    HashMap queryMap(@Param("start") int start, @Param("limit") int limit );
}
